<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='javascript:;' class="on"><em>焦点图列表</em></a><span>|</span><a
				href='/Focus/add/'><em>添加焦点图</em></a>
		</div>
	</div>
	<div class="pad_10">
		<form name="searchform" action="" method="get">
			<table width="100%" cellspacing="0" class="search-form">
				<tbody>
					<tr>
						<td><div class="explain-col">
								所属分类 <select name="cate_id" id="cate_id">
									<option value="">--请选择分类--</option>
									<?php
									if(!empty($Catelist)) {
										foreach ($Catelist as $val) {
									?>
									<option <?php if($val['FocusCate']['id']==$cate_id) { ?>selected<?php } ?> value="<?php echo $val['FocusCate']['id'] ?>">
										<?php echo $val['FocusCate']['name'] ?>
									</option>
									<?php }} ?>
								</select> 关键字 <input type="text" value="" class="input-text" id="keyword"
									name="keyword"> <input type="button" onclick="Search()"
									value="搜索" class="button" name="dosubmit">
							</div></td>
					</tr>
				</tbody>
			</table>
		</form>
		<div class="table-list">
			<form name="myform" action="/Focus/listorder/" method="post">
				<table width="100%" cellspacing="0">
					<thead>
						<tr>
							<th width="10%">序号</th>
							<th width="10%" align="left">焦点图片</th>
							<th width="10%" align="left">标题</th>
							<th width="20%" align="left">链接地址</th>
							<th width="10%" align="left">所属分类</th>
							<th width="5%" align="left">点击数</th>
							<th width="5%" align="left">状态</th>
							<th width="15%">管理操作</th>
						</tr>
					</thead>
					<tbody>
						<?php
						if(!empty($list)){
						  foreach ($list as $val) { 
						?>
						<tr>
							<td width="10%" align="center">
								<?php echo $val['Focus']['id'] ?>
							</td>
							<td width="10%"><img
								style="border: 1px solid #999999; padding: 1px; width: 60px; height: 30px;"
								src="<?php echo Configure::read('admin_config.mainDomain'); ?><?php echo $val['Focus']['img_small'] ?>">
							</td>
							<td width="10%">
								<?php echo $val['Focus']['title'] ?>
							</td>
							<td width="20%">
								<?php echo $val['Focus']['url'] ?>
							</td>
							<td width="10%">
								<?php echo $val['Focus']['cate_desc'] ?>
							</td>
							<td width="5%">
								<?php echo $val['Focus']['clicks'] ?>
							</td>
							<td width="5%">
								<?php if($val['Focus']['status']) { echo '已审核'; }else{ echo '未审核';}?>
							</td>
							<td width="15%" align="center"><a
								href="/Focus/edit/<?php echo $val['Focus']['id'] ?>/">修改</a> | <a
								href="javascript:;"
								onclick="delete_Focus(<?php echo $val['Focus']['id'] ?>)">删除</a>
							</td>
						</tr>
						<?php } } ?>
					</tbody>
				</table>
				<div id="pages">
					<?php echo $this->Page->show($perpage, $total, $curpage, 10, '/Focus/index/cate_id:' . $cate_id . '/keyword:' . $keyword . '/page:', 2 .'/'); ?>
				</div>
			</form>
		</div>
	</div>
</body>
<script type="text/javascript">
	//搜索
	function Search() {
		url = '/Focus/index/';
		url += 'cate_id:' + $('#cate_id').val() + '/';
		url += 'keyword:' + $('#keyword').val() + '/';

		window.location.href = url;
	};
<!--
	$(document).ready(function() {
		window.top.$('#display_center_id').css('display', 'none');
	});
//-->
</script>